//
//  DemoSumTests.m
//  OCUnitPlus
//
//  Created by William Zhao on 13-8-6.
//  Copyright (c) 2013年 William Zhao. All rights reserved.
//

#import "DemoSumTests.h"
#import "YKViewController.h"

@interface DemoSumTests() {
    YKViewController* _viewController;
}

@end

@implementation DemoSumTests

- (void)setUp
{
    [super setUp];
    
    _viewController = [[YKViewController alloc] init];
}

- (void)tearDown
{
    [_viewController release];
    
    [super tearDown];
}

- (void)testSum
{
    NSUInteger price = 250;
    NSUInteger fee = 10;
    
    NSUInteger amount = [_viewController sum:price fee:fee];
    if(amount!=160)
        STFail(@"amount error");
}

@end
